package com.bocloud.cmp.entity.resource;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;

@Table("network_card")
public class NetworkCard extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id;
	@Column("used")
	private Boolean used;// 网卡在某一台物理机上是否被使用
	@Column("host_id")
	private Long hostId;
	@Column("vendor_id")
	private Long vendorId;
	@Column("mac")
	private String mac;
	@Column("category")
	private String category;
	@Column("label")
	private String label;

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the used
	 */
	public Boolean getUsed() {
		return used;
	}

	/**
	 * @param used
	 *            the used to set
	 */
	public void setUsed(Boolean used) {
		this.used = used;
	}

	/**
	 * @return the hostId
	 */
	public Long getHostId() {
		return hostId;
	}

	/**
	 * @param hostId
	 *            the hostId to set
	 */
	public void setHostId(Long hostId) {
		this.hostId = hostId;
	}

	/**
	 * @return the vendorId
	 */
	public Long getVendorId() {
		return vendorId;
	}

	/**
	 * @param vendorId
	 *            the vendorId to set
	 */
	public void setVendorId(Long vendorId) {
		this.vendorId = vendorId;
	}

	/**
	 * @return the mac
	 */
	public String getMac() {
		return mac;
	}

	/**
	 * @param mac
	 *            the mac to set
	 */
	public void setMac(String mac) {
		this.mac = mac;
	}

	/**
	 * @return the category
	 */
	public String getCategory() {
		return category;
	}

	/**
	 * @param category
	 *            the category to set
	 */
	public void setCategory(String category) {
		this.category = category;
	}

	/**
	 * @return the label
	 */
	public String getLabel() {
		return label;
	}

	/**
	 * @param label
	 *            the label to set
	 */
	public void setLabel(String label) {
		this.label = label;
	}

	public void preSave(Long createrId, Long menderId, Long vendorId, Long hostId, String category) {
		this.setCreaterId(createrId);
		this.setMenderId(menderId);
		this.setVendorId(vendorId);
		this.setHostId(hostId);
		this.setCategory(category);
	}

}
